home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Tools & Utilities
/
Collection of Tools and Utilities.iso
/
basic
/
wprint.zip
/
WPRINT.DOC
next >
Wrap
Text File
|
1987-12-05
|
3KB
|
64 lines
WPRINT.INC
Copyright (c) 1987 by Unique Software
[an added feature to TBWINDO.INC (required)]
Usage
CALL Wprint(windo%,wcolor%,strng$,no.cr%)
Description of passed variables
windo%
An integer defining the window to which you want the passed string
printed. Note that this does NOT have to be the current active window.
WPRINT allows you to print to ANY window on the screen! Of course if your
windows overlap, WPRINT will not work properly. If you pass a zero, 0, or a
value greater than the number of windows on the screen, WPRINT will print
the string, strng$, to the current active window.
wcolor%
An integer defining the foreground color in which the string, strng$,
will be printed. The background color of the window is ALWAYS used. You can
pass a value of zero, 0, to use the default colors for the window.
strng$
A string variable holding the string you want to be printed.
no.cr%
An integer specifying if you DON't want a <CR> processed after the
string is printed. This may sound confusing but consider the way a standard
PRINT statement works. If you want BASIC or TB to NOT generate a <CR> after
a print statement you ADD a semi-colon to the end of the string. No.cr%
works this same way. Passing a value OTHER THAN zero, 0, will prevent the
<CR> from being generated.
I N S T A L L A T I O N
Now for the hard part. You have to modify a few of the SUB's within
TBWINDO.INC for WPRINT to work properly. Here they are in step by step
fashion.
(1) At the TOP of the TBWINDO.INC file just after the line which starts
"dim wrow(mw),..." add the following line:
dim wcrow(mw),wccol(mw)
(2) Within "MakeWindow()", just after the line which starts "shared
wrow()..." add the following line:
shared wcrow(),wccol()
(3) Within "MakeWindow()", just after the line "li=li+1" add the
following line:
wcrow(li)=1 : wccol(li)=1
(4) Within "RemoveWindow", just after the line which starts "shared
wrow()..." add the following lines:
shared wcrow(),wccol()
wcrow(li)=1 : wccol(li)=1
(5) Within "ClearWindow", just after the line which starts "shared
wrow()..." add the following lines:
shared wcrow(),wccol()
wcrow(li)=1 : wccol(li)=1
(6) Within "WindowXY()", just after the line which starts "shared
wrow()..." add the following lines:
shared wcrow(),wccol()
wcrow(li)=row : wccol(li)=col
(7) Enjoy WPRINTing all over (but inside) your windows!